package com.ccb.lms.service;

import java.sql.SQLException;
import java.util.List;

import com.ccb.lms.facade.FacadeDAO;
import com.ccb.lms.model.Appoint;
import com.ccb.lms.util.BasePage;

public class AppointService implements IAppointService {
	private FacadeDAO facadeDAO = null;

	
	public FacadeDAO getFacadeDAO() {
		return facadeDAO;
	}

	public void setFacadeDAO(FacadeDAO facadeDAO) {
		this.facadeDAO = facadeDAO;
	}
	
	public boolean insertAppoint(Appoint appoint) throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().insertAppoint(appoint);
	}

	public boolean deleteAppoint(Integer appointNO) throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().deleteAppoint(appointNO);
	}

	public boolean updateAppoint(Appoint appoint) throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().updateAppoint(appoint);
	}

	public List<Appoint> getAllAppoints() throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().getAllAppoints();
	}

	public Appoint getAppointByNO(Integer appointNO) throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().getAppointByNO(appointNO);
	}

	public int getAppointCount() throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().getAppointCount();
	}

	public BasePage getBasePage(int currentPage, int showRecordNum)
			throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().getBasePage(currentPage, showRecordNum);
	}

	public List<Appoint> getAppointByPage(BasePage basePage) throws SQLException {
		// TODO Auto-generated method stub
		return facadeDAO.getAppointDAO().getAppointByPage(basePage);
	}

}
